C1.LiveLinq.AdoNet Namespace > AdoNetExtensions Class > AsIndexed Method : AsIndexed<TRow>(TypedTableBase<TRow>) Method |
'Declaration
Public Overloads Shared Function AsIndexed(Of TRow As System.Data.DataRow)( _ ByVal table As System.Data.TypedTableBase(Of TRow) _ ) As IndexedDataTable(Of TRow)
public static IndexedDataTable<TRow> AsIndexed<TRow>( System.Data.TypedTableBase<TRow> table ) where TRow: System.Data.DataRow
Use this method to index typed data tables and query them using the query operators optimized with indexing.
Elements of the source data table aren't duplicated or copied to a new collection. This method just wraps the original data table in an IndexedDataTable<TRow>.
Note: The IndexedDataTable<TRow> wrapper is owned by the original System.Data.DataTable object (in fact, it is stored in its ExtendedProperties). So, if you create a wrapper for the same data table several times, it will be the same object.Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2